<?php
define('YOUR_APP_ID', '467099466649736');

//uses the PHP SDK.  Download from https://github.com/facebook/php-sdk
require 'controller/facebook.php';
require 'controller/base_facebook.php';

$facebook = new Facebook(array(
	'appId'  => YOUR_APP_ID,
	'secret' => '6ce835b316664d1c4f81e681491e9856',
	));

$userId = $facebook->getUser();

?>

    <script>
      window.fbAsyncInit = function() {
        FB.init({
          appId      : '467099466649736',
          status     : true, 
          cookie     : true,
          xfbml      : true,
          oauth      : true,
        });

        FB.Event.subscribe('auth.login', function(response) {
          window.location.reload();
        });
      };

      (function(d){
         var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
         js = d.createElement('script'); js.id = id; js.async = true;
         js.src = "//connect.facebook.net/en_US/all.js";
         d.getElementsByTagName('head')[0].appendChild(js);
       }(document));
    </script>